/*
 * SharkOrganizerApp.java
 */

package sharkorganizer;

import org.jdesktop.application.Application;
import org.jdesktop.application.SingleFrameApplication;
import java.util.LinkedList;

/**
 * The main class of the application.
 */
public class SharkOrganizerApp extends SingleFrameApplication {

    /**
     * At startup create and show the main frame of the application.
     */
    @Override protected void startup() {
        show(new SharkOrganizerView(this));
    }

    /**
     * This method is to initialize the specified window by injecting resources.
     * Windows shown in our application come fully initialized from the GUI
     * builder, so this additional configuration is not needed.
     */
    @Override protected void configureWindow(java.awt.Window root) {
    }

    /**
     * A convenient static getter for the application instance.
     * @return the instance of SharkOrganizerApp
     */
    public static SharkOrganizerApp getApplication() {
        return Application.getInstance(SharkOrganizerApp.class);
    }

    /**
     * Main method launching the application.
     */
    public static void main(String[] args) {
        launch(SharkOrganizerApp.class, args);

        LinkedList<No> lista = new LinkedList<No>();

        for (int i = 1; i < 4; i++){
            No no = new No(i);
            lista.add(no);
            no.setValores(no.nick(), 2, i*0.50, 10, 0.29);
        }

        for (int i = 4; i < 7; i++){
            No no = new No("Cartão");
            lista.add(no);
            no.setValores(no.nick(), 2, i*0.50, 10, (no.custos())[2]);
        }

        for (int i = 7; i < 11; i++){
            No no = new No();
            lista.add(no);
            no.setValores(no.nick(), 2, i*0.50, 10, i*0.29);
        }

        for (int i = 0; i < 10; i++){
            System.out.println(lista.get(i).nick());
            System.out.println((lista.get(i).custos())[0] + "\t" + (lista.get(i).custos())[1] + "\t" + (lista.get(i).custos())[2]);
            System.out.println();
        }


    }
}
